<?php

namespace Modules\Shop\Http\Controllers;
use Illuminate\View\FileViewFinder;
use View;
use App;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Routing\Controller;

class HomeController extends Controller
{
    /**
     * Display a listing of the resource.
     * @return Response
     */
    public function __construct () {
    	//获得public下的templates文件夹路径
		$config=\HDModule::config('admin.config.template');
    	$path=[public_path ('templates').'/'.$config];
    	//改变模板的目录文件夹,在构造函数中将view加载模板的路径改变，指向我们给定的目录
    	View::setFinder (new FileViewFinder(App::make ('files'),$path));
	}

	public function index()
    {
		return view('index');
    }
}
